
import joosTests.*;
import regTests.*;
public class Test{

    public static void main(String[] args) throws Exception{
		/*double b = 1.0;
		float f = 1;
		long l = -10;
		
		System.out.println(b);
		System.out.println(f);
		char c = (char)l;
		int d = c;
		System.out.println(d);
		System.out.println(l);
		
		//int multi[][] = new int[2][2];
		//multi[1][0] = 0;
		//System.out.println(multi[1][0]);
		 
		
		*/
		//Parent a1 = new Inherit();
		//Inherit a2 = new Inherit();
		/*
		Parent[] ar = new Parent[50];
		for(int i=0;i<50;i++){
			if((i%2)==0){
				ar[i] = new Inherit();
			}else{
				ar[i] = new InheritInherit();
			}
		}
		for(int i=0;i<50;i++){
			System.out.println(ar[i].a());
		}
		*/
		
		//1.
		SortingAlgorithms.RunSortTest.RunTest(1000);
		//2.
		abstractAndPolyTest.TestAbstract.RunTest(1000);

		//if(true)
		//	return;
		
		//3. Iteration
		Iteration.main(null);
		
		//4. Fibonacci
		Hanoi.main(null);
		Fibonacci.main(null);
		
		//5. RegressionTests
		Inherit.main(null);
		Branch.main(null);
		Numbers.main(null);
		ClassTest.main(null);
		Tarray.main(null);
		
		//6.sieve
		Sieve.findPrimesOf(100000);
		
		//7.joosTests
		java.io.File fi = new java.io.File("joosTests");
		String[] sl = fi.list();
		
		for(int y=0;y<sl.length;y++){
			String str = sl[y];
			//System.out.println(sl[y]);
			String pat = str.substring(sl[y].length()-5);
			String bat = sl[y].substring(0,sl[y].length()-6);
			if(pat.equals("class")){
				Class klass =Class.forName("joosTests.".concat(bat));
				java.lang.reflect.Method m = klass.getMethod("test", (Class[])null);
				Integer o = new Integer((Integer)m.invoke(null, (Object[])null));
				if(o.intValue() == 123)
					System.out.println("pass");
				else
					System.out.println("!!fail");
			}
		}
		 
		 
    }
}